﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Globalization;
using System.Web.Security;

namespace braklimitu.Models
{
    public class CommentContext : DbContext
    {
        public CommentContext()
            : base("DefaultConnection")
        {
        }

        public DbSet<Comment> Comments { get; set; }
    }

    [Table("Comments")]
    public class Comment
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        [Key]
        public int UserId { get; set; }
        public int Note { get; set; }
        public string CommentText { get; set; }
    }

    public class CommentModel
    {
        [Required]
        public int Note { get; set; }
        [Required]
        public string Comment { get; set; }
    }
}